package cn.crc.pjblog.util;

public class PublicMethod {
	
	/**
	 * @author doublel
	 * 
	 * This is a good idea from Bom Lee
	 *  a lazy loading Singleton
	 *  It is nested a static class 
	 *  
	 * */
	
	static class PublicMethodHolder{
		
		static PublicMethod instance = new PublicMethod();
	}
	
	public static PublicMethod getInstance(){
		return PublicMethodHolder.instance;
	}
	
	/**
	 * @author doublel
	 * @param String input
	 * @return boolean isNull true:not null or space
	 * 						  false: is null or space
	 * 检查前台传入的参数是否为null或者空
	 * */
	public final boolean checkInputNull(String input){
		boolean  isNull= false;
		
		if (input == null || input.trim().length()== 0)
			isNull=false;
			else
			isNull =true;
		
		
		return isNull;
		
	} 
}
